<template>
	<view class="chase_type">
		<view class="header">
			<text>选择模式</text>
		</view>
		<view class="close" @click="$emit('close')">
			<image :src="`${baseImageUrl}/common/close1.png`"></image>
		</view>
		<view class="list">
			<view class="item" v-for="item in list" @click="$emit('change', item)">
				<view class="item_view">
					<image :src="item.url"></image>
					<text>{{item.name}}</text>
				</view>
				<view class="btn">选择</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		baseImageUrl
	} from "@/utils/config.js"
	export default {
		props: {
			list: {
				type: Array,
				default: () => []
			}
		},
		data(){
			return{}
		}
	}
</script>

<style scoped lang="scss">
	.chase_type {
		height: 900rpx;
		padding: 20rpx;
		box-sizing: border-box;
		background: url(#{$baseImageUrl}/bg/688_606.png) no-repeat;
		background-size: 100% 100%;
		position: relative;

		.close {
			width: 122rpx;
			height: 122rpx;
			position: absolute;
			right: 0rpx;
			top: 0rpx;
			transform: translate(30rpx, -50rpx);
			z-index: 2;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.header {
			height: 88rpx;
			color: #494338;
			font-size: 42rpx;
			font-family: LiSu;
			font-weight: 400;
			border-radius: 20rpx 20rpx 0px 0px;
			padding: 0 24rpx;
			display: flex;
			justify-content: center;
			align-items: center;

			image {
				width: 48rpx;
				height: 48rpx;
			}
		}

		.list {
			.item {
				width: 100%;
				height: 120rpx;
				border-bottom: 1px solid rgba(163, 159, 160, 0.5);
				padding: 0 40rpx;
				box-sizing: border-box;
				display: flex;
				justify-content: space-between;
				align-items: center;

				.item_view {
					display: flex;
					align-items: center;

					image {
						width: 50rpx;
						height: 50rpx;
					}

					text {
						color: #494338;
						font-size: 36rpx;
						font-weight: 400;
						font-family: SimSun;
						padding-left: 16rpx;
						box-sizing: border-box;
					}
				}

				.btn {
					width: 140rpx;
					height: 70rpx;
					line-height: 70rpx;
					text-align: center;
					color: #FFFFFF;
					font-size: 32rpx;
					font-weight: 400;
					font-family: SimSun;
					background: url(#{$baseImageUrl}/common/btn.png) no-repeat;
					background-size: 100% 100%;
				}
			}
		}
	}
</style>